unit uAddPageForm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, ExtDlgs;

type
  TAddPageForm = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Label1: TLabel;
    edtName: TEdit;
    Label2: TLabel;
    Label3: TLabel;
    Image1: TImage;
    OpenPictureDialog1: TOpenPictureDialog;
    procedure Image1DblClick(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    FileName: string;
  end;

var
  AddPageForm: TAddPageForm;

implementation

{$R *.dfm}

procedure TAddPageForm.Image1DblClick(Sender: TObject);
begin
  if OpenPictureDialog1.Execute then
  begin
    FileName := OpenPictureDialog1.FileName;
    Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);
  end;
end;

procedure TAddPageForm.Button1Click(Sender: TObject);
begin
  ModalResult := MrOK;
end;

procedure TAddPageForm.Button2Click(Sender: TObject);
begin
  Close;
end;

end.
